{template '_header'}
<div class='page-heading'><h2><i class="fa fa-circle-o"></i>排行榜设置  {ifp 'member.rank'}{/if}</h2></div>

<form {ifp 'member.rank.edit'}action="" method="post"{/if} class='form-horizontal form-validate'>

    <div class="form-group-title">积分排行榜设置</div>

    <div class="form-group">
        <label class="col-sm-2 control-label">直接链接</label>
        <div class="col-sm-9 col-xs-12">
            <p class='form-control-static'>
                <a href='javascript:;' class="js-clip" title='点击复制链接' data-url="{php echo mobileUrl('member/rank',array(),true)}" >
                    {php echo mobileUrl('member/rank',array(),true)}
                </a>
                <span style="cursor: pointer;" data-toggle="popover" data-trigger="hover" data-html="true"
                      data-content="<img src='{$qrcode_credit}' width='130' alt='链接二维码'>" data-placement="auto right">
                    <i class="glyphicon glyphicon-qrcode"></i>
                </span>
            </p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">积分排行榜开关</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'member.rank.edit'}
            <label class="radio-inline">
                <input type="radio" name="status" value="0" {if empty($item['status'])}checked{/if} /> 关闭
            </label>
            <label class="radio-inline">
                <input type="radio" name="status" value="1" {if $item['status']==1}checked{/if} /> 开启
            </label>
            {else}
            <div class='form-control-static'>{if empty($item['status'])}关闭{else}开启{/if}</div>
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">积分榜显示数量</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'member.rank.edit'}
            <input type="text" name="num" class="form-control" value="{$item['num']}"/>
            <span class='help-block'>如果不填写，默认显示前50名</span>
            {else}
            <div class='form-control-static'>{$item['num']}</div>
            {/if}
        </div>
    </div>

    <div class="form-group-title">消费排行榜设置</div>

    <div class="form-group">
        <label class="col-sm-2 control-label">直接链接</label>
        <div class="col-sm-9 col-xs-12">
            <p class='form-control-static'>
                <a href='javascript:;' class="js-clip" title='点击复制链接' data-url="{php echo mobileUrl('member/rank/order_rank',array(),true)}" >
                    {php echo mobileUrl('member/rank/order_rank',array(),true)}
                </a>
                <span style="cursor: pointer;" data-toggle="popover" data-trigger="hover" data-html="true"
                      data-content="<img src='{$qrcode_money}' width='130' alt='链接二维码'>" data-placement="auto right">
                    <i class="glyphicon glyphicon-qrcode"></i>
                </span>
            </p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">消费排行榜开关</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'member.rank.edit'}
            <label class="radio-inline">
                <input type="radio" name="order_status" value="0" {if empty($item['order_status'])}checked{/if} /> 关闭
            </label>
            <label class="radio-inline">
                <input type="radio" name="order_status" value="1" {if $item['order_status']==1}checked{/if} /> 开启
            </label>
            {else}
            <div class='form-control-static'>{if empty($item['order_status'])}关闭{else}开启{/if}</div>
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">消费榜显示数量</label>
        <div class="col-sm-9 col-xs-12">
            {ifp 'member.rank.edit'}
            <input type="text" name="order_num" class="form-control" value="{$item['order_num']}"/>
            <span class='help-block'>如果不填写，默认显示前50名</span>
            {else}
            <div class='form-control-static'>{$item['order_num']}</div>
            {/if}
        </div>
    </div>
    {ifp 'member.rank.edit'}
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <input type="submit" class="btn btn-primary" value="保存">
    </div>
    {/if}
</form>

{template '_footer'}